//* any_cast<T>()
#include <boost/any.hpp>
#include <string>
#include <iostream>
 
int main()
{
    boost::any a = 1;
    std::cout << boost::any_cast<int>(a) << std::endl;
    a = 3.14;
    std::cout << boost::any_cast<double>(a) << std::endl;
    a = true;
    std::cout << std::boolalpha << boost::any_cast<bool>(a) << std::endl;
    //a = "Liang Zhang"; /*compile error
    a = std::string("Liang Zhang");
    std::cout << boost::any_cast<std::string>(a) << std::endl;
}